using System;
using System.ComponentModel;

namespace QLTB.BusinessObjects
{
    /// <summary>
    /// Project: NNS System 
    /// Generated Class for Table : TBL_DONVI.
    /// Date: 6/24/2010
    /// Author: Trần Hoàng Tâm
    /// </summary>
    public class TBL_DONVI : Object
    {
        #region Init

        private int m_CapDonvi;
        private string m_Diachi;
        private string m_DienThoai;
        private string m_IPClass;
        private int? m_MaCapTren;
        private int m_MaDonVi;
        private string m_TenDonVi;


        public TBL_DONVI()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public TBL_DONVI(
            int MaDonVi,
            string TenDonVi,
            string IPClass,
            int MaCapTren,
            string Diachi,
            string DienThoai,
            int CapDonvi)
        {
            //
            // TODO: Add constructor logic here
            //
            SetData
                (
                    MaDonVi,
                    TenDonVi,
                    IPClass,
                    MaCapTren,
                    Diachi,
                    DienThoai,
                    CapDonvi
                );
        }


        public void SetData(
            int MaDonVi,
            string TenDonVi,
            string IPClass,
            int MaCapTren,
            string Diachi,
            string DienThoai,
            int CapDonvi)
        {
            //
            // TODO: Add constructor logic here
            //
            m_MaDonVi = MaDonVi;
            m_TenDonVi = TenDonVi;
            m_IPClass = IPClass;
            m_MaCapTren = MaCapTren;
            m_Diachi = Diachi;
            m_DienThoai = DienThoai;
            m_CapDonvi = CapDonvi;
        }

        #endregion

        #region Property

        [DisplayName("MaDonVi")]
        [Category("Primary Key")]
        public int MaDonVi
        {
            get { return m_MaDonVi; }
            set { m_MaDonVi = value; }
        }

        [DisplayName("TenDonVi")]
        [Category("Column")]
        public string TenDonVi
        {
            get { return m_TenDonVi; }
            set { m_TenDonVi = value; }
        }

        [DisplayName("IPClass")]
        [Category("Column")]
        public string IPClass
        {
            get { return m_IPClass; }
            set { m_IPClass = value; }
        }

        [DisplayName("MaCapTren")]
        [Category("Column")]
        public int? MaCapTren
        {
            get { return m_MaCapTren; }
            set { m_MaCapTren = value; }
        }

        [DisplayName("Diachi")]
        [Category("Column")]
        public string Diachi
        {
            get { return m_Diachi; }
            set { m_Diachi = value; }
        }

        [DisplayName("DienThoai")]
        [Category("Column")]
        public string DienThoai
        {
            get { return m_DienThoai; }
            set { m_DienThoai = value; }
        }

        [DisplayName("CapDonvi")]
        [Category("Column")]
        public int CapDonvi
        {
            get { return m_CapDonvi; }
            set { m_CapDonvi = value; }
        }

        #endregion
    }

    #region Enum Fields

    public enum TBL_DONVIFields
    {
        MaDonVi,
        TenDonVi,
        IPClass,
        MaCapTren,
        Diachi,
        DienThoai,
        CapDonvi
    }

    #endregion
}